package com.glory.cqaospda.base

import androidx.databinding.BaseObservable
import androidx.databinding.Bindable
import com.glory.cqaospda.bean.EqpMaterialsBean
import com.glory.cqaospda.bean.LogInfoBean

class Constant {

    companion object : BaseObservable() {

        @get:Bindable
        var http:String = "http://"
//        var mUrl:String = "192.168.200.21"
        var mUrl:String = ""
        var AOSPDA:String = "/api/AOSPDA/"
        var fileUrl:String = "192.168.137.1"
        var orgName: String = ""
        var eqpid: String = ""
        var UserName: String = ""
        var isUpdate:Boolean = true
        var mfgList = ArrayList<LogInfoBean.MfgListBean>()
        var IsInspectItemLongClickListener = true

        //超时时长
        var connectTimeout: Int = 5

        var lotID: String = ""

        var eqpMaterialsBean: EqpMaterialsBean? = null

        var loginTime = "0000"
        var time = "0000"
        var okgoError = false
        var lastClickTime:Long = 0
        fun isFastClick(): Boolean {
            var flag = false
            val  curClickTime:Long = System.currentTimeMillis()
            if ((curClickTime - lastClickTime) >= 500) {
                flag = true
            }
            lastClickTime = curClickTime;
            return flag
        }
    }

}